Title: Replication File for "Democratic Resilience in the Twenty-First Century. Search for an Analytical Framework and Explorative Analysis"
Journal: Political Studies
DOI: 10.1177/00323217251345779
Link: https://dx.doi.org/10.1177/00323217251345779
Author: Aurel Croissant and Lars Lott
Correspondence: Lars Lott, Friedrich-Alexander-University Erlangen-Nuremberg (lars.lott@fau.de)
Date: May 7th, 2025

Required Software: R and RStudio (4.5 or Above). 
Additional required software packages and libraries are specified in the replication code. User should install the respective libraries by their own. 
An additional local library called "vutils" can be installed from the local folder. 

Overview: These files replicate all analyses presented in �Democratic Resilience in the Twenty-First Century. Search for an Analytical Framework and Explorative Analysis�, Political Studies. https://doi.org/XXX

To replicate all analyses and figures, download all data files to a folder entitled �~/data�, create folders in the same Directory for the different original data. 
The R scripts are stored in the main folder. Create also an folder named "~/results".

The data folder contains all data that is necessary to computationally reproduce the results presented in this article and the supplementary appendix. Please consider the folder structure in the data folder. 

%%%%%%%%%%%%%% Replication Code for each Table and Figure in Main Paper %%%%%%%%%%%%%%

%%% Table 1 %%%
This Table was manually constructed by the authors.

%%% Table 2 %%%
To reproduce Table 2, run 01_data_wrangling.R This code also loads 00_BFA.R to estimate the Democratic Resilience Capacity Index. 
Please consider that depending on the computer power, this script will run multiple hours. On a 16-core machine with 64BG of memory of took ~8 hours to converge. 
Code was orignally written by Dan Pemstein and V-Dem core team (see McMann et al. 2022 Political Analysis). It has been adapated in this reserch for the Democratic Resilience Capacity Index

%%% Table 3 %%%
To reproduce Table 3, run 03_replication_Boese_et_al.R

%%% Table 4 %%%
To reproduce Table 4, run 03_replication_Boese_et_al.R

%%% Table 5 %%%
To reproduce Table 5, run 03_replication_Boese_et_al.R

%%% Figure 1 %%%%
This Table was manually plotted by the authors.

%%% Figure 2 %%%%
To reproduce Figure 2, run 01_data_wrangling.R

%%% Figure 3 %%%%
To reproduce Figure 3, run 01_data_wrangling.R

%%% Figure 4 %%%%
To reproduce Figure 4, run 01_data_wrangling.R

%%% Figure 5 %%%%
To reproduce Figure 5, run 03_replication_Boese_et_al.R

%%% Figure 6 %%%%
To reproduce Figure 6, run 03_replication_Boese_et_al.R

%%% Figure 7 %%%%
To reproduce Figure 7, run 03_replication_Boese_et_al.R

%%% Figure 8 %%%%
To reproduce Figure 8, run 03_replication_Boese_et_al.R


%%%%%%%%%%%%%% Replication Code for each Table and Figure in Appendix %%%%%%%%%%%%%%

%%% Figure A1 %%%
To reproduce Figure A1, run 01_data_wrangling.R

%%% Table A1 %%%
To reproduce Table A1, run 02_FFA.R

%%% Figures A2 - A5 %%%
To reproduce Figures A2 to A5, run 01_data_wrangling.R

%%% Figures A6 - A11 %%%
To reproduce Figures A2 to A5, run 04_costruct_validity_tests.R

%%% Table A2 %%%
To reproduce Table A2, run 03_replication_Boese_et_al.R

%%% Tables A3 - A5 %%%
To reproduce Tables A3 to A5, run 03_replication_Boese_et_al.R


%%%%%%%%%%%%%% Data Files (relative path "~/data") %%%%%%%%%%%%%%

%%%% bfa folder %%%%
-country_unit.rds
-input includes posterior csv files
-results includes mcmc posterior files for the DRC Index

%%%% bmr folder %%%%
-Boix Miller Rosate Regime Type Data

%%%% claassen folder %%%%
-includes data from Claassen 2020 for democratic mood and democracv satisfaction

%%%% ert folder %%%%
-includes data from the Episodes of Regime Transformation project

%%%% political trust BJPS study folder %%%%
-includes data from Valgar�sson et al. (2025) for political trust

%%%% v_party folder %%%%
-includes data from V-Party dataset (V-Dem Institute)

%%%% vdem14 folder %%%%
-includes data from V-Dem dataset Version 14. 

%%%%%%%%%%%%%% Output Files (relative path "~/results") %%%%%%%%%%%%%%

Stored tables and figures original data

%%%%%%%%%%%%%% vutils package (relative path "~/vutils") %%%%%%%%%%%%%%

Library built by the V-Dem core team to manage V-Dem data; parts of this library has been used for the analysis presented in this paper. 
Please install this package by installing it from the folder provided in the replication package



